<div id="main">
    <div class="container-fluid">
        <div class="page-header">
        	<div class="pull-left">
        		<h1>渠道列表</h1>
        	</div>
        	<div class="pull-right">
        		<ul class="stats">
        			<li class='lightred'>
        				<i class="icon-calendar"></i>
        				<div class="details">
        					<span class="big"></span>
        					<span></span>
        				</div>
        			</li>
        		</ul>
        	</div>
        </div>
        <div class="breadcrumbs">
        	<ul>
        		<li>
        			<a href="javascript:void(0);">后台管理</a>
        			<i class="icon-angle-right"></i>
        		</li>
        		<li>
        			<a href="javascript:void(0);">系统管理</a>
        			<i class="icon-angle-right"></i>
        		</li>
        		<li>
        			<a href="javascript:void(0);">渠道列表</a>
        		</li>
        	</ul>
        	<div class="close-bread">
        		<a href="#"><i class="icon-remove"></i></a>
        	</div>
        </div>
        <div class="row-fluid">
        	<div class="span12">
        		<div class="box box-color box-bordered">
        			<div class="box-title">
        				<h3>
        					<i class="icon-th-list"></i>
        					渠道列表
        				</h3>
                        <div class="actions">
        					<a rel="tooltip" id="upChannels" href="javascript:void(0);" class="btn btn-danger show_shadefrist"> 更新渠道</a>
        				</div>
        			</div>
                    <div style="border: 2px solid #368ee0;border-top: none;border-bottom: none;">
                        <style>
                            #ui-datepicker-div.ui-widget-content{background: #fff;border: 1px solid gray;}
                            table{text-align: left;width: 100%;}
                            table tr th{background-color: #eeeeee;}
                            table tr td,table tr th{border: 1px solid gray;padding: 10px;}
                            table input{width: 80px;height: 20px;}
                            
                            table label{display: inline-block;cursor: default;margin: 0 3px;}
                            table input[type="checkbox"],table input[type="radio"]{margin: 0;cursor: default;margin-top: -2px;}
                            table .thSetPrice a{
                                display: block;margin: 5px 0;padding: 3px 5px;border: 1px solid #888888;background-color: #888888;
                                color: #fff;text-decoration: none;text-align: center;width: 60px;cursor: pointer;
                            }
                            table a:hover{text-decoration: none;background-color: #368ee0;border-color: #368ee0;}
                            
                            .page{padding: 5px;border: 2px solid #368ee0;border-top: none;}
                            .page .page_count{padding-top: 5px;}
                            .page .page_count label{display: inline-block;line-height: 30px;font-weight: normal;float: left;}
                            .page .page_count .paginate_button{
                                margin: 0 5px;
                                float: left;
                                background-color: #D5D5D5;
                                padding: 5px 12px;
                                color: #7d7d7d;
                                border-radius: 3px;
                            }
                            .page .page_count .paginate_button:hover{
                                background-color: #89affc;
                                color: #fff;
                            }
                            .page .page_count .paginate_active{
                                margin: 0 5px;
                                float: left;
                                padding: 5px 12px;
                                color: #fff;
                                background-color: #89affc;
                                border-radius: 3px;
                            }
                            .page a{text-decoration: none;}
                        </style>
                        <table>
        					<thead>
        						<tr>
        							<th>序号</th>
        							<th>渠道名称</th>
        							<th>接通状态</th>
        						</tr>
        					</thead>
                            <?
                                foreach($re as $k=>$v){
                                    ?>
                                    <tr>
										<td><?=$k+1?></td>
										<td><?=$v['title']?></td>
										<td><?=$v['status']==1?'<font color="green">已接通</font>':'<font color="red">未接通</font>'?></td>
            						</tr>
                                    <?
                                }
                            ?>
        				</table>
                    </div>
                    <div class="page">
                        <?=$pageHtml?>
                    </div>
        		</div>
        	</div>
        </div>
    </div>
</div>
<script type="text/javascript">
$('#upChannels').click(function(){
	$.ajax({
		type:'POST',
		url:'<?=$this->url('system/upChannels')?>',
		data:'',
		dataType:'json',
		success:function(r){
			if(r.state==1){
				pub_alert_success(r.html,2000);
				setTimeout(function(){window.location.reload()},2000);
			}else if(r.state==0){
				pub_alert_error(r.html,2000);
			}
		},
		error:function(){
			pub_alert_error("ajax出现错误");
		}
	});
});
</script>